package models

type ControlBy struct {
	CreateBy string `json:"create_by" gorm:"column:create_by;type:string;index;comment:创建者" validate:"max=35"`
	UpdateBy string `json:"update_by" gorm:"column:update_by;type:string;index;comment:更新者" validate:"max=35"`
}

// SetCreateBy 设置创建人id
func (e *ControlBy) SetCreateBy(createBy string) {
	e.CreateBy = createBy
}

// SetUpdateBy 设置修改人id
func (e *ControlBy) SetUpdateBy(updateBy string) {
	e.UpdateBy = updateBy
}

type Model struct {
	Id int `json:"id" gorm:"primaryKey;autoIncrement;comment:主键编码"`
}

type ModelTime struct {
	CreateTime int64 `json:"create_time" gorm:"column:create_time;type:int;comment:创建时间"`
	UpdateTime int64 `json:"update_time" gorm:"column:update_time;type:int;comment:更新时间"`
	//DeletedAt   gorm.DeletedAt `json:"-" gorm:"index;comment:删除时间"`
}
